Operating System
Q161.
Each of a set of n processes executes the following code using two semaphores a and b initialized to 1 and 0, respectively. Assume that count is a shared variable initialized to 0 and not used in CODE SECTION P. What does the code achieve?Q162.
Procedures P1 and P2 have a producer-consumer relationship, communicating by the use of a set of shared buffers.P1 : repeat Obtain an empty buffer Fill it Return a full buffer forever P2: repeat Obtain a full buffer Empty it Return an empty buffer forever Increasing the number of buffers is likely to do which of the following? I. Increase the rate at which requests are satisfied (throughput) II. Decrease the likelihood of deadlock III. Increase the ease of achieving a correct implementationQ163.
Which of the following actions is/are typically not performed by the operating system when switching context from process A to process B?Q165.
Which of the following need not necessarily be saved on a context switch between processes?Q166.
In multi-programmed systems, it is advantageous if some programs such as editors and compilers can be shared by several users. Which of the following must be true of multi-programmed systems in order that a single copy of a program can be shared by several users? I. The program is a macro II. The program is recursive III. The program is reentrantQ167.
The maximum number of processes that can be in Ready state for a computer system with n CPUs isQ169.
The process state transition diagram of an operating system is as given below. Which of the following must be FALSE about the above operating system?